#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
using namespace std;
#include<vector>
#include<algorithm>
int main()
{
	int n = 0;
	cin >> n;
	vector<int> arr;
	while (n--)
	{
		int x = 0;
		cin >> x;
		arr.push_back(x);

	}
	sort(arr.begin(), arr.end());
	cout << arr[0] << endl;
	return 0;
}

#include <iostream>
using namespace std;

int main() {
    int n;
    cin >> n;
    long long max_min = 0, min_max = 1e18;
    for (int i = 0; i < n; ++i) {
        long long A, B;
        cin >> A >> B;
        long long v_min = (A + B) / (B + 1);
        long long v_max = A / B;
        if (v_min > max_min) max_min = v_min;
        if (v_max < min_max) min_max = v_max;
    }
    cout << max_min << " " << min_max << endl;
    return 0;
}

int main() {
    int n, q;
    cin >> n >> q;
    vector<int> arr(n + 1);
    for (int i = 1; i <= n; i++)
    {
        cin >> arr[i];
    }
    vector<int> dp(n + 1);
    for (int i = 1; i <= n; i++)
    {
        dp[i] = dp[i - 1] + arr[i];
    }
    while (q--)
    {
        int l, r;
        cin >> l >> r;
        cout << dp[r] - dp[l - 1] << endl;
    }
    return 0;
}

int main()
{
	int n, m, q;
	cin >> n >> m >> q;
	vector<vector<int>> a(n + 1, vector<int>(m + 1));
	for (int i = 1; i <= n; i++)
	{
		for (int j = 1; j <= m; j++)
		{
			cin >> a[i][j];
		}
	}
	vector<vector<int>> dp(n + 1, vector<int>(m + 1));
	for (int i = 1; i <= n; i++)
	{
		for (int j = 1; j <= m; j++)
		{
			dp[i][j] = dp[i - 1][j] + dp[i][j - 1] - dp[i - 1][j - 1] + a[i][j];
		}
	}
	while (q--)
	{
		int x1, y1, x2, y2;
		cin >> x1 >> y1 >> x2 >> y2;
		int ret = 0;
		ret = dp[x2][y2] - dp[x1 - 1][y2] - dp[x2][y1 - 1] + dp[x1 - 1][y1 - 1];
		cout << ret << endl;
	}
	return 0;
}


class Solution {
public:
    int pivotIndex(vector<int>& nums) {
        int n = nums.size();
        vector<int> f(n);
        vector<int> g(n);
        
        for (int i = 1; i < n; i++)
        {
            f[i] = f[i - 1] + nums[i-1];
        }
        for (int i = n - 2; i >= 0; i--)
        {
            g[i] = g[i + 1] + nums[i+1];
        }

        for (int i = 0; i < n; i++)
        {
            if (f[i] == g[i])
                return i;
        }

        return -1;
    }
};
int main()
{

	return 0;
}